/**
 * Generali Solutions d'assurances - Tous droits réservés &copy; 2007 - 2010
 */

package fr.generali.accueilclient.opt.detailcampagne.builder;

import fr.generali.accueilclient.opt.detailcampagne.om.ICritereEntreeDetailCamp;
import fr.generali.accueilclient.opt.detailcampagne.om.impl.DTOCritereEntreeDetailCamp;

/**
 * @author Holmes Kelly
 */
public class DTOCritereEntreeDetailCampBuilder extends
                DTOCritereEntreeDetailCampBuilderBase<DTOCritereEntreeDetailCampBuilder> {

    /**
     * constructeur
     */
    public DTOCritereEntreeDetailCampBuilder() {
        super(new DTOCritereEntreeDetailCamp());
    }

    /**
     * @return DTOCritereEntreeDetailCampBuilder
     */
    public static DTOCritereEntreeDetailCampBuilder dTOCritereEntreeDetailCamp() {
        return new DTOCritereEntreeDetailCampBuilder();
    }

    /**
     * @return instance
     */
    public ICritereEntreeDetailCamp build() {
        return getInstance();
    }
}

/**
 * @author Holmes Kelly
 * @param <GeneratorT>
 */
class DTOCritereEntreeDetailCampBuilderBase<GeneratorT extends DTOCritereEntreeDetailCampBuilderBase<GeneratorT>> {

    /**
     * instance
     */
    private ICritereEntreeDetailCamp instance;

    /**
     * @param aInstance instance
     */
    protected DTOCritereEntreeDetailCampBuilderBase(ICritereEntreeDetailCamp aInstance) {
        instance = aInstance;
    }

    /**
     * @return instance
     */
    protected ICritereEntreeDetailCamp getInstance() {
        return instance;
    }

    /**
     * @param aValue identifiant
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildIdentifiant(String aValue) {
        instance.setIdentifiant(aValue);

        return (GeneratorT ) this;
    }
}
